package UserInterface;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import BusinessLayer.Facade;



/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * PanelMenuNotation.java
 *
 * Created on 22 mars 2011, 14:51:40
 */

/**
 * panel du menu de la notation des etudiants
 * @author cyrene
 */
public class PanelMenuNotation extends javax.swing.JPanel implements ActionListener{

    private GUINotation guiNotation;

	/** Creates new form PanelMenuNotation */
	public PanelMenuNotation(GUINotation guiNotation) {
    	this.guiNotation=guiNotation;
        initComponents();
        this.jComboBoxChoix.addActionListener(this);
        this.guiNotation.deconnexion.addActionListener(this);
    }

  
	/**
	 * initialisation des composants
	 */
    private void initComponents() {

        jLabel1 = new javax.swing.JLabel();
        jComboBoxChoix = new javax.swing.JComboBox();

        jLabel1.setText("Que desirez vous faire ?");

        jComboBoxChoix.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Selectionner votre choix", "Editer/Visualiser une note", "Consulter les statistiques" }));

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(71, 71, 71)
                .addComponent(jLabel1)
                .addGap(113, 113, 113)
                .addComponent(jComboBoxChoix, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(48, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(101, 101, 101)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel1)
                    .addComponent(jComboBoxChoix, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(171, Short.MAX_VALUE))
        );
    }// </editor-fold>


    /**
     * declaration des composants du panel
     */
    private javax.swing.JComboBox jComboBoxChoix;
    private javax.swing.JLabel jLabel1;
    // End of variables declaration

    public void actionPerformed(ActionEvent e) {
		if (e.getSource()== this.jComboBoxChoix){			
			this.guiNotation.setDataJcombo(this.jComboBoxChoix.getSelectedItem().toString());
			
		}

		
	}
}
